{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_gjhdbm/template/public/ygcss.css">
<style type="text/css">
 .dizhi{margin-top: 10px;color: #44ABF7;}
 .yginp{width: 50%;}
 .ygspan{line-height: 35px;margin-left: 10px;}
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li ><a href="{php echo $this->createWebUrl('activity');}">活动管理</a></li>
    <li class="active"><a href="{php echo $this->createWebUrl('addactivity');}">添加活动</a></li>
</ul>
<div class="main ygmain">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                内容编辑
            </div>
            <div class="panel-body">
             <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">活动海报</label>
                <div class="col-sm-10">
                    {php echo tpl_form_field_image('logo',$list['logo']);} 
                </div>
            </div>
         <!--    <div class="form-group">
             <label for="inputEmail3" class="col-sm-2 control-label">排序编号</label>
             <div class="col-sm-10">
              <input type="text"  name="orderby" value="{$list['orderby']}" class="form-control" id="inputEmail3" placeholder="由小到大排序,数字越小排在前面
              ">
          </div>
                  </div> -->
         <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">活动标题</label>
            <div class="col-sm-10">
              <input type="text"  name="title" value="{$list['title']}" class="form-control" id="inputEmail3" placeholder="请填写活动标题,80字以内">
          </div>
      </div>
      <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">活动场地</label>
        <div class="col-sm-10">
         <select class="form-control" name="activity_type"> 
            {if $list['activity_type']==1}  
            <option value="1" selected="selected">线上活动</option>
            <option value="2" >线下活动</option>
            {elseif $list['activity_type']==2}
            <option value="1" >线上活动</option>
            <option value="2" selected="selected">线下活动</option> 
            {else}
            <option value="1" >线上活动</option>
            <option value="2" >线下活动</option>
            {/if}
        </select>
    </div>
</div>
<div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">联系电话</label>
    <div class="col-sm-9">
        <input type="text" name="link_tel" class="form-control" value="{$list['link_tel']}" />
    </div>
</div>  
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">活动分类</label>
    <div class="col-sm-10">
       <select class="form-control" name="type_id"> 
        {loop $type $key $item}
        {if $item['id']==$list['type_id']}
        <option value="{$item['id']}" selected="selected">{$item['type_name']}</option>
        {else}
        <option value="{$item['id']}" >{$item['type_name']}</option>
        {/if}
        {/loop}
    </select>
</div>
</div>
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">活动城市</label>
    <div class="col-sm-10">
       <select class="form-control" name="cityname"> 
        {loop $city $key $item}
        {if $item['cityname']==$list['cityname']}
        <option value="{$item['cityname']}" selected="selected">{$item['cityname']}</option>
        {else}
        <option value="{$item['cityname']}" >{$item['cityname']}</option>
        {/if}
        {/loop}
    </select>
</div>
</div>
<div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动详细地址</label>
    <div class="col-sm-9">
        <input type="text" name="address" class="form-control" value="{$list['address']}" />
    </div>
</div>   
<div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">地址坐标</label>
    <div class="col-sm-10">
     <!-- {php echo tpl_form_field_coordinate('op',$list['coordinates'])} -->
     <input type="text" name="coordinates" class="form-control dizhiname" value="{$list['coordinates']}" placeholder="例如:30.527540,114.346430" />
     <a href="http://lbs.qq.com/tool/getpoint/" target="_blank">
         <p class="dizhi">*点击获取地理位置</p></a>
     </div>
 </div>
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">活动开始时间</label>
    <div class="col-sm-10">
     <!-- <input type="text"  name="start_time" value="{$list['start_time']}" class="form-control" id="inputEmail3" placeholder="请填写活动开始时间"> -->
     {php echo tpl_form_field_date(start_time, $list['start_time'],$withtime = true);}

 </div>

</div>
<div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">活动结束时间</label>

    <div class="col-sm-10">

        <!--  <input type="text"  name="end_time" value="{$list['end_time']}" class="form-control" id="inputEmail3" placeholder="请填写活动结束时间"> -->
        {php echo tpl_form_field_date(end_time, $list['end_time'],$withtime = true);}

    </div>

</div>
<!-- <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">报名开始时间</label>

    <div class="col-sm-10">

     <input type="text"  name="start_time" value="{$list['start_time']}" class="form-control" id="inputEmail3" placeholder="请填写活动开始时间">
     {php echo tpl_form_field_date(bm_start, $list['bm_start'],$withtime = true);}

 </div>

</div>
<div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">报名结束时间</label>

    <div class="col-sm-10">

        <input type="text"  name="end_time" value="{$list['end_time']}" class="form-control" id="inputEmail3" placeholder="请填写活动结束时间">
        {php echo tpl_form_field_date(bm_end, $list['bm_end'],$withtime = true);}

    </div>

</div> -->

<!-- <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">活动总张数</label>

    <div class="col-sm-10">

     <input type="number"  name="total_num" value="{$list['total_num']}" class="form-control" id="inputEmail3" placeholder="请填写活动限制人数">

 </div>

</div>
<div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">报名限购张数/人</label>

    <div class="col-sm-10">

     <input type="number"  name="limit_num" value="{$list['limit_num']}" class="form-control" id="inputEmail3" placeholder="请填写活动限制人数">

 </div>

</div>
 <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">参加方式</label>
        <div class="col-sm-10">
         <select class="form-control" name="join_type"> 
            {if $list['join_type']==1}  
            <option value="1" selected="selected">在线报名</option>
            <option value="2" >无需报名</option>
            {elseif $list['join_type']==2}
            <option value="1" >在线报名</option>
            <option value="2" selected="selected">无需报名</option> 
            {else}
            <option value="1" >在线报名</option>
            <option value="2" >无需报名</option>
            {/if}
        </select>
    </div>
</div>

<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">报名金额</label>
    <div class="col-sm-10">
     <input type="text"  name="cost" value="{$list['cost']}" class="form-control" id="inputEmail3" placeholder="请填活动金额">
 </div>
</div>
<div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">报名是否需要审核</label>
    <div class="col-sm-9">
        <label class="radio-inline">
            <input type="radio" id="emailwy1" name="bm_check" value="1" {if $list['bm_check']==1 }checked{/if} />
            <label for="emailwy1">是</label>
        </label>
        <label class="radio-inline">
            <input type="radio" id="emailwy2" name="bm_check" value="2" {if $list['bm_check']==2|| empty($list['bm_check'])}checked{/if} />
            <label for="emailwy2">否</label>
        </label>    
    </div>
</div> -->

<!-- <div class="form-group">

    <label for="inputEmail3" class="col-sm-2 control-label">是否设置</label>
    <div class="col-sm-10">
        <select class="form-control" name="goods_type"> 
            {if $list['goods_type']==1}  
     <option value="1" selected="selected">头条推荐</option>  
     <option value="2" >普通活动</option>
     <option value="3" >精选活动</option>
     {elseif $list['goods_type']==2}
     <option value="1" >头条推荐</option>
     <option value="2" selected="selected">普通活动</option>
     <option value="3" >精选活动</option>
     {elseif $list['goods_type']==3}
     <option value="1" >头条推荐</option>
     <option value="2">普通活动</option>
     <option value="3"  selected="selected" >精选活动</option>
     {else}
     <option value="1">头条推荐</option>
     <option value="2" >普通活动</option>
     <option value="3" >精选活动</option>
     {/if}
 </select>
</div>
</div> -->

<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">活动详情</label>
    <div class="col-sm-10">
      {php echo tpl_ueditor('content',$list['content']);}
  </div>
</div>
{if $_GPC['hd_item']!=2}
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">票卷名称</label>
    <div class="col-sm-10">
     <input type="text"  name="tk_name" value="{$list['tk_name']}" class="form-control" id="inputEmail3" placeholder="请填票卷名称">
 </div>
</div>
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">活动金额</label>
    <div class="col-sm-10">
     <input type="text"  name="money" value="{$list['money']}" class="form-control" id="inputEmail3" placeholder="请填活动金额">
     不填写为免费
 </div>
</div>
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">票总张数</label>
    <div class="col-sm-10">
     <input type="text"  name="total_num" value="{$list['total_num']}" class="form-control" id="inputEmail3" placeholder="票总张数">  
 </div>
</div>
<div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">限制张数</label>
    <div class="col-sm-10">
     <input type="text"  name="limit_num" value="{$list['limit_num']}" class="form-control" id="inputEmail3" placeholder="限制张数"> 
 </div>
</div>
<!-- <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">限制张数</label>
    <div class="col-sm-10">
     <input type="text"  name="limit_num" value="{$list['limit_num']}" class="form-control" id="inputEmail3" placeholder="限制张数"> 
 </div>
</div> -->
<div class="form-group">
<label class="col-xs-12 col-sm-3 col-md-2 control-label">报名是否需要审核</label>
    <div class="col-sm-9">
        <label class="radio-inline">
            <input type="radio" id="emailwy1" name="bm_check" value="1" {if $info['bm_check']==1 || empty($info['bm_check'])}checked{/if} />
            <label for="emailwy1">是</label>
        </label>
        <label class="radio-inline">
            <input type="radio" id="emailwy2" name="bm_check" value="2" {if $info['bm_check']==2}checked{/if} />
            <label for="emailwy2">否</label>
        </label>    
    </div>
</div>
{/if}
</div>

</div>

<div class="form-group">
    <input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>
    <input type="hidden" name="token" value="{$_W['token']}" />
    <input type="hidden" name="id" value="{$list['id']}" />
</div>
</form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-8").show();
        $("#yframe-8").addClass("wyactive");
    })
</script>